package io;

import java.io.BufferedOutputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;

public class BufferOutputStreamDemo {

    public static void main(String[] args) throws IOException {
        // 缓冲数组默认32大小
        OutputStream outputStream = new FileOutputStream("test.txt");
        BufferedOutputStream bufferedOutputStream = new BufferedOutputStream(outputStream);
        // 输出到缓冲区
        bufferedOutputStream.write("abc".getBytes());
        bufferedOutputStream.close();
        outputStream.close();
    }
}
